<template>
  <div class="about">
    <h4>服务端获取的用户信息：{{userInfo}}</h4>
  </div>
</template>
<script>
// @ is an alias to /src

export default {
  name: "About",
  data: () => {
    return {
      userInfo: {},
    };
  },
  methods: {
    getUserInfo() {
      fetch('/api/userInfo').then(value => value.json()).then((res) => {
        this.userInfo = res
      })
    },
  },
  created() {
    this.getUserInfo()
  }
};
</script>